import request from '../../utils/request';
/** 审批流程管理  */

//  列表查询 
export function getList (params){
    console.log(params)
    return request({
        url:"/sys/flow/findFlowListByPage.do",
        method: 'post',
        data: params,
        headContype:true
    });

};


// 新增 
export function Add (params){
    console.log(params)
    return request({
        url:"/sys/flow/addFlow.do",
        method: 'post',
        data: params,
        headContype:true
    });

};


// 新增 节点
export function addStep (params){
    console.log(params)
    return request({
        url:"/sys/flow/addStep.do",
        method: 'post',
        data: params,
        headContype:true
    });

};




// 列表详情
export function Details (params){
    console.log(params)
    return request({
        url:"/sys/agriculturalCapitalMerchant/detail.do",
        method: 'get',
        params: params
    });

};


// 列表删除
export function ListDel (params){
    console.log(params)
    return request({
        url:"/sys/flow/deleteFlow.do",
        method: 'DELETE',
        params: params
    });

};


// 列表编辑
export function Update (params){
    console.log(params)
    return request({
        url:"/sys/flow/editFlow.do",
        method: 'post',
        data: params,
        headContype:true
    });
};

// 新增 节点
export function UpdateStep (params){
    console.log(params)
    return request({
        url:"/sys/flow/editStep.do",
        method: 'post',
        data: params,
        headContype:true
    });

};



// 检查流程id是否存在
export function validateFlowId (params){
    return request({
        url:"/sys/flow/flowIdExist.do",
        method: 'get',
        params: params
    });
};


//查询节点 步骤列表
export function qryAllStepsByFlow (params){
    console.log(params)
    return request({
        url:"/sys/flow/qryAllStepsByFlow.do",
        method: 'post',
        params: params
    });

};

// 删除节点
export function deleteStep (params){
    console.log(params)
    return request({
        url:"/sys/flow/deleteStep.do",
        method: 'DELETE',
        params: params
    });

};




//下载文件 
export function downFile (params){
    console.log(params)
    return request({
        url:"/sys/file/new/down",
        // url:"/sys/file/down",
        method: 'get',
        params: params
    });
};

